<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>驴行天下</title>

	<script src="js/jquery.js"></script>
    <link href="js/bootstrap.css" rel="stylesheet">
    <link href="js/style.css" rel="stylesheet" type="text/css">
    <link href="js/zhsk.css" rel="stylesheet" type="text/css">
    <script src="js/bootstrap.min.js"></script>

</head>
<style>
.btn-default {
  color: #fff;
/*  background-color: #6abd85;
  border-color: #5aa272;*/
    background-color: #e04236;
  border-color: #e04236;
}

.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open .dropdown-toggle.btn-default {
  color: #fff;
/*  background-color: #44bd6c;
  border-color: #4c9869;*/
  background-color: #F51100;
  border-color: #e04236;
}
.form-group>label{ width:16.6%}
</style>
	 <?php

             $error=$_REQUEST['error'];
              if($error==1)
		     echo "<SCRIPT>alert('用户名不能为空');</SCRIPT>";
             else if($error==2)
		     echo "<SCRIPT>alert('密码错误，登录失败');</SCRIPT>";
		  ?>
<body class="back_lg_color">
      <div class="login_div">
          <div class="login_ban font_lg_title">
           驴行天下活动平台
          </div>
          
          <div class="login_content">
            <form class="form-horizontal" method="post" action="function_deal.php?fun=login" role="form" id="myform"  onsubmit="return validata();">
               <div class="form-group">
                  <label for="lastname" class="col-sm-2 control-label">用户名:</label>
                  <div class="col-sm-6">
                     <input type="text" class="form-control"  name="user_name" id="user_name"
                        placeholder="请输入用户名">
                  </div>
               </div>
                <div class="form-group">
                  <label for="lastname" class="col-sm-2 control-label">密码:</label>
                  <div class="col-sm-6">
                     <input type="password" class="form-control"  name="password" id="password"
                        placeholder="请输入密码">
                  </div>
               </div>

               <div class="form-group">
                  <div class="col-sm-offset-2 col-sm-10">
                     <button type="submit" class="btn btn-default btn_width"    >登录</button>
                  </div>
               </div>
            </form>
          </div>
      </div>
 <script>
		   function  validata()
		   {
		     var user_name=$('#user_name').val();
			 var password=$('#password').val();

			 
			 

			 if(user_name=='')
			 {
				 alert('用户名不能为空');
				 return false;
			 } 
			  if(password=='')
			 {
				 alert('密码不能为空');
				 return false;
			 }
			
			return true;
			
		   }
		   
	
		</script>	 

	
</body>
 </html>
        
       
